const db = wx.cloud.database();
const app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {

  },


  onLoad: function (options) {
    var that = this;
    wx.setStorageSync('area', options.area)
    wx.setStorageSync('agent', options.agent)
    wx.setStorageSync('page', options.page)
  },
  toindex: function () {
    var that = this;
    var area = wx.getStorageSync('area')
    var agent = wx.getStorageSync('agent')
    var page = wx.getStorageSync('page')
    wx.navigateTo({
      url: '../search/search/search?area=' + area + '&agent=' + agent + '&page=' + page,
    })
  },




  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    var area = wx.getStorageSync('area')
    var agent = wx.getStorageSync('agent')
    var page = wx.getStorageSync('page')
    return {
      title: '2021国家公务员招录考试职位表',
      path: 'pages/search/search/search?area=' + area + '&agent=' + agent + '&page=' + page
    }
  },
  /**分享到朋友圈*/
  onShareTimeline: function () {
    var area = wx.getStorageSync('area')
    var agent = wx.getStorageSync('agent')
    var page = wx.getStorageSync('page')
    return {
      title: '2021国家公务员招录考试职位表',
      path: 'pages/search/search/search?area=' + area + '&agent=' + agent + '&page=' + page
    }
  }
})